<template>
  <!-- 详情 -->
  <el-dialog title="通道信息详情" :visible.sync="dialogVisible" width="50%" append-to-body :close-on-click-modal="false" :before-close="closedialog">
       <el-descriptions :column="2"  border>
		 <el-descriptions-item>
		        <template slot="label">
		         通道名称
		        </template>
		       {{form.channelName}}
		  </el-descriptions-item>
		  <el-descriptions-item>
		        <template slot="label">
		         进出场
		        </template>
		        <dict-tag :options="dict.type.field_ie_type" :value="form.ieType"/>
		  </el-descriptions-item>
		  <el-descriptions-item>
		        <template slot="label">
		         进出口
		        </template>
		        <dict-tag :options="dict.type.sys_i_e_flag" :value="form.ieFlag"/>
		  </el-descriptions-item>
		  <el-descriptions-item>
		        <template slot="label">
		         贸易类型
		        </template>
		        <dict-tag :options="dict.type.trade_type_list" :value="form.tradeType"/>
		  </el-descriptions-item>
		  <el-descriptions-item>
		        <template slot="label">
		         场站编码
		        </template>
		        <dict-tag :options="dict.type.tsg" :value="form.fieldCode"/>
		  </el-descriptions-item>
		 <el-descriptions-item>
		        <template slot="label">
		         场站名称
		        </template>
		       {{form.fieldName}}
		  </el-descriptions-item>
		 <el-descriptions-item>
		        <template slot="label">
		         创建时间
		        </template>
		       {{form.createTime}}
		  </el-descriptions-item>
		 <el-descriptions-item>
		        <template slot="label">
		         创建人
		        </template>
		       {{form.createBy}}
		  </el-descriptions-item>
		 <el-descriptions-item>
		        <template slot="label">
		         备注
		        </template>
		       {{form.remark}}
		  </el-descriptions-item>
		 <el-descriptions-item>
		        <template slot="label">
		         第几道卡
		        </template>
		       {{form.gateLevel}}
		  </el-descriptions-item>
		 <el-descriptions-item>
		        <template slot="label">
		         互市卡口
		        </template>
		       {{form.bmGateType}}
		  </el-descriptions-item>
         </el-descriptions>
        <div slot="footer" class="dialog-footer" style="text-align: center;">
          <el-button @click="closedialog">关闭</el-button>
        </div>
    </el-dialog>
</template>

<script>
import { getChannelInfo } from "@/api/system/channelInfo";
export default {
  props: {
    dict: {}
  },
  data() {
    return {
      //显示详情
      dialogVisible:false,
      form: {
                                      channelCode: null,
                                            channelName: null,
                                            ieType: null,
                                            ieFlag: null,
                                            tradeType: null,
                                            fieldCode: null,
                                            fieldName: null,
                                            createTime: null,
                                            createBy: null,
                                            remark: null,
                                            gateLevel: null,
                                            bmGateType: null
                      }
    }
  },
  methods: {
    open(row){
      this.dialogVisible = true;
      this.loadDetail(row);
    },
    closedialog(){
      this.dialogVisible = false
    },
    // 获取详情
    loadDetail(row) {
      getChannelInfo(row.id).then((res) => {
        if (res.code == 200) {
          this.form = res.data;
                  }
      });
    },
  }
};
</script>

<style>

</style>
